﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;

public partial class _Default :BasePage
{
 

    protected void Page_Load(object sender, EventArgs e)
    {
        string lang;
        if (Request.Cookies["culture"].Value == "en-US")
            lang = "en";
        else lang = "vi";
        PostingDAO postDAO = new PostingDAO();
        dtlPost.DataSource = postDAO.GetAll(lang);
        dtlPost.DataBind();

    }
    protected void btnEnglish_Click(object sender, EventArgs e)
    {
        Response.Cookies["culture"].Value = "en-US";
        Response.Redirect("default.aspx");
    }
    protected void btnVietnamese_Click(object sender, EventArgs e)
    {
        Response.Cookies["culture"].Value = "vi-VN";
        Response.Redirect("default.aspx");
    }
}